home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Source Code / C++ / Applications / Argus TE 2.0 / Argus Libraries 2.0 / Argus Standards / ArgusAbout.cp next >
Encoding:
Text File  |  1995-06-28  |  1.8 KB  |  87 lines  |  [TEXT/KAHL]

  1. /**********************************************************************
  2.  
  3.     ArgusAbout.cp
  4.  
  5. ***********************************************************************/
  6.  
  7. /*
  8.     Functions Include:
  9.     
  10.       MyAboutDialog           Standard Argus About Dialog
  11. */
  12.  
  13. /********** Includes */
  14. #include <Dialogs.h>
  15. #include "Fn_Prototypes.h" // prototypes (with extern prefix)
  16. #include "ArgusHelp.h"
  17.  
  18. // #include "SampleWindow.h"  // may need to modify
  19. #include "TE Window.h"  // added
  20.  
  21. /********** Defines */
  22. #define ABOUT_DLOG     599
  23. #define NIL_PTR        0L
  24. #define ALLOCATE_MEM   0
  25. #define IN_FRONT       (WindowPtr)-1L
  26. #define OK_BUTTON      1
  27. #define HELP_BUTTON    2
  28.  
  29.  
  30. /********** Prototypes */
  31. Boolean MyAboutDialog( void );
  32.  
  33.  
  34. /********** SampleDialog */
  35.  
  36. Boolean MyAboutDialog( void )
  37. {
  38.     WindowPtr   docWindow;
  39.     DialogPtr   dialog;
  40.     Boolean     done;
  41.     Boolean     result;
  42.     short       itemHit;
  43.     short       itemType;
  44.     Handle      itemHandle;
  45.     Rect        itemRect;
  46.     EventRecord theEvent;
  47.  
  48.     result = FALSE;
  49.  
  50.     docWindow = FrontWindow();
  51.     if( docWindow != NIL_PTR )
  52.         MyDoDeactivateWindow( docWindow );
  53.  
  54.     dialog = GetNewDialog( ABOUT_DLOG, ALLOCATE_MEM, IN_FRONT );
  55.  
  56.     if( dialog == NIL_PTR )
  57.         return( result );
  58.  
  59.     /* AdjustMenus_(); */
  60.  
  61.     ShowWindow( dialog );
  62.     FnMisc_FrameButton( dialog, OK_BUTTON );
  63.  
  64.     done = FALSE;
  65.     while( done == FALSE )
  66.     {
  67.         ModalDialog( nil, &itemHit );
  68.  
  69.         switch( itemHit )
  70.         {
  71.             case OK_BUTTON:
  72.                 result = TRUE;
  73.                 done = TRUE;
  74.                 break;
  75.             case HELP_BUTTON:
  76.                 DisposeDialog( dialog );
  77.                 MyHelpDialog();
  78.                 done = TRUE;
  79.                 return( result );
  80.                 break;
  81.         }
  82.      }
  83.     DisposDialog( dialog );
  84.     return( result );
  85. }
  86.  
  87. // End of File